﻿@model IEnumerable<LetsDealData.Entities.Provider>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>

@{
    var i = 1;
}

<table class="table table-striped full table-bordered dataTable" border="1" style="border-collapse:collapse;">
    <tr>
        <th scope="col">STT</th>
        <th scope="col">Tên nhà cung cấp</th>
        <th scope="col">Địa chỉ</th>
        <th scope="col">Sđt</th>
        <th scope="col">Fax</th>
        <th scope="col">Email</th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>@(i++)</td>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Address)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Tel)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Fax)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Email)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
        </td>
    </tr>
}

</table>
